package com.caipos.repository.jpa;

import com.caipos.entity.DeviceData;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface DeviceDataJpaRepository extends JpaRepository<DeviceData, Long> {
    List<DeviceData> findByDeviceIdOrderByTimestampDesc(String deviceId);
    List<DeviceData> findByDeviceIdAndDataTypeOrderByTimestampDesc(String deviceId, String dataType);
}
    